#include <unistd.h>
#include <fcntl.h>

char buf1[] = "abcdefghij";
char buf2[] = "ABCDEFGHIJ";

int main() 
{
	int fd;

	if((fd = creat("file.hole", 0644)) < 0) {
		perror("cannot create file.hole");
		return -1;
	}

	if(write(fd, buf1, 10) != 10) {
		perror("caanot write buf1");
	}

	if(lseek(fd, 40, SEEK_SET) == -1)
		perror("cannot seek");

	if(write(fd, buf2, 10) != 10) {
		perror("caanot write buf2");
	}

	close(fd);
	return 0;
}
